package com.google.gwt.sample.stockwatcher.client;

import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;

@SuppressWarnings("deprecation")
public class ItemSuggestion_FieldSerializer {
  public static class Handler implements com.google.gwt.user.client.rpc.impl.TypeHandler {
    public void deserialize(SerializationStreamReader reader, Object object) throws SerializationException {
      com.google.gwt.sample.stockwatcher.client.ItemSuggestion_FieldSerializer.deserialize(reader, (com.google.gwt.sample.stockwatcher.client.ItemSuggestion)object);
    }
    public Object instantiate(SerializationStreamReader reader) throws SerializationException {
      return com.google.gwt.sample.stockwatcher.client.ItemSuggestion_FieldSerializer.instantiate(reader);
    }
    public void serialize(SerializationStreamWriter writer, Object object) throws SerializationException {
      com.google.gwt.sample.stockwatcher.client.ItemSuggestion_FieldSerializer.serialize(writer, (com.google.gwt.sample.stockwatcher.client.ItemSuggestion)object);
    }
  }
  private static native java.lang.String getDisplay(com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance) /*-{
    return instance.@com.google.gwt.sample.stockwatcher.client.ItemSuggestion::display;
  }-*/;
  
  private static native void  setDisplay(com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance, java.lang.String value) /*-{
    instance.@com.google.gwt.sample.stockwatcher.client.ItemSuggestion::display = value;
  }-*/;
  
  private static native java.lang.String getReplacement(com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance) /*-{
    return instance.@com.google.gwt.sample.stockwatcher.client.ItemSuggestion::replacement;
  }-*/;
  
  private static native void  setReplacement(com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance, java.lang.String value) /*-{
    instance.@com.google.gwt.sample.stockwatcher.client.ItemSuggestion::replacement = value;
  }-*/;
  
  public static Class<?> concreteType() {
    return com.google.gwt.sample.stockwatcher.client.ItemSuggestion.class;
  }
  
  public static void deserialize(SerializationStreamReader streamReader, com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance) throws SerializationException {
    setDisplay(instance, streamReader.readString());
    setReplacement(instance, streamReader.readString());
    
  }
  
  public static com.google.gwt.sample.stockwatcher.client.ItemSuggestion instantiate(SerializationStreamReader streamReader) throws SerializationException {
    return new com.google.gwt.sample.stockwatcher.client.ItemSuggestion();
  }
  
  public static void serialize(SerializationStreamWriter streamWriter, com.google.gwt.sample.stockwatcher.client.ItemSuggestion instance) throws SerializationException {
    streamWriter.writeString(getDisplay(instance));
    streamWriter.writeString(getReplacement(instance));
    
  }
  
}
